﻿@model IEnumerable<QuanLyHocSinh.Models.DanhSachHocSinhModel>

@{
    ViewBag.Title = "DanhSach";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>DanhSach</h2>
    @if (Model == null || Model.Any() == false)
    {

        <p>Không có kết quả</p>
        return;
    }
<p>
    @Html.ActionLink("Nhập học sinh mới", "TaoHocSinh")
</p>
<table class="table tablesaw tablesaw-stack" data-tablesaw-mode="stack" data-tablesaw-sortable>
    <thead>
        <tr>
            <th data-tablesaw-sortable-col data-tablesaw-sortable-default-col>
                @Html.DisplayNameFor(model => model.MaSV)
            </th>
            <th data-tablesaw-sortable-col>
                @Html.DisplayNameFor(model => model.TenSV)
            </th>
            <th data-tablesaw-sortable-col>
                @Html.DisplayNameFor(model => model.Nganh)
            </th>
            <th data-tablesaw-sortable-col>
                @Html.DisplayNameFor(model => model.NgaySinh)
            </th>
            <th data-tablesaw-sortable-col>
                @Html.DisplayNameFor(model => model.GioiTinh)
            </th>
            <th data-tablesaw-sortable-col>
                @Html.DisplayNameFor(model => model.Lop)
            </th>
            <th data-tablesaw-sortable-col>
                @Html.DisplayNameFor(model => model.KhoaHoc)
            </th>
            <th></th>
        </tr>
    </thead>
    <tbody>
    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.ActionLink(item.MaSV, "ChiTiet", new {maSv = item.MaSV})

            </td>
            <td>
                @Html.DisplayFor(modelItem => item.TenSV)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Nganh)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.NgaySinh)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.GioiTinh)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Lop)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.KhoaHoc)
            </td>
            <td>
                @Html.ActionLink("Edit", "Edit", new {/* id=item.PrimaryKey */}) |
                |
                @Html.ActionLink("Delete", "Delete", new {/* id=item.PrimaryKey */})
            </td>
        </tr>
    }
    </tbody>
</table>
